//reducer
const initialState = {
    text: 10
}
const reducer = (state = initialState, action) => {
    switch (action.type) {
        case 'CHANGE_TEXT':
            return {
                text: state.text - action.num
            }
        case 'BUTTON_CLICK':
            return {
                text: state.text +1
            }
        case 'TYPEED':
            return {
                typeed: action.typeed
            }
        default:
            return state;
    }
}

export default reducer